﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="RageComic.aspx.cs" Inherits="www.Admin.RageComic1" %>
<%@ Import Namespace="www.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
     <script type="text/javascript">

         function CheckAllEmp(checkbox) {
             var gridVwHeaderChckbox = document.getElementById("<%=grid_Ragecomic.ClientID %>");
            for (i = 1; i < gridVwHeaderChckbox.rows.length; i++) {
                gridVwHeaderChckbox.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = checkbox.checked;
            }
        }


    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <div class="title">
        QUẢN LÝ CHẾ ẢNH
    </div>
    <div class="clear">
    </div>
    <div class="row">
        <div class="ColLeft">Loại</div>
        <div class="ColRight">
            <asp:DropDownList ID="ddlTypes" runat="server" CssClass="combobox" AutoPostBack="True" OnSelectedIndexChanged="ddlTypes_SelectedIndexChanged" >
                <asp:ListItem Value="0">Rage Comic</asp:ListItem>
                <asp:ListItem Value="1">Meme</asp:ListItem>
            </asp:DropDownList>
        </div>
    </div>
    <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
    <div id="pnviews" runat="server">

        <div class="frame ">
            <div class="table">
                <img src="../Design/Icon/icon/add.png" class="control" />
                <asp:LinkButton ID="lbtinsert1" runat="server" OnClick="lbtinsert_Click">Thêm mới</asp:LinkButton>
                <img src="../Design/Icon/icon/delete.png" class="control" />
                <asp:LinkButton ID="lbtdel1" runat="server" OnClick="lbtdel_Click">Xóa</asp:LinkButton>
                <img src="../Design/Icon/icon/refresh.png" class="control" />
                <asp:LinkButton ID="lbtrefresh1" runat="server" OnClick="lbtrefresh_Click">Làm tươi</asp:LinkButton>
                <img src="../Design/Icon/icon/uplevel.png" class="control" />
                <a href="javascript:void(0);" onclick="window.history.go(-1);">Trở lại</a>
            </div>
            <div>
                <asp:GridView ID="grid_Ragecomic" runat="server" AutoGenerateColumns="False" BackColor="White"
                    BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" Width="100%" AllowPaging="True"
                    PageSize="20" ShowHeaderWhenEmpty="True" OnRowCommand="grid_Ragecomic_RowCommand" OnPageIndexChanging="grid_Ragecomic_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input id="chkselectall" type="checkbox" runat="server" onclick="CheckAllEmp(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkselect" runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField Visible="False">
                            <ItemTemplate>
                                <asp:Label ID="lblId" runat="server" Text='<%#Eval("Id") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <span id="lblImage">Hình ảnh</span>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <span id="lblImages">
                                    <img src='~/<%#Eval("Image") %>' style="width: 99%; height: 120px; position: relative;" /></span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <span id="lblType">Loại</span>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <span id="lblTypes"><%#Eval("Type") %></span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <span id="lblStatus">Trạng thái</span>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <span id="lbltt"><%# Utilities.Active(Convert.ToInt32(Eval("Active"))) %></span>
                            </ItemTemplate>
                            <HeaderStyle Width="10%"></HeaderStyle>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <span id="lblBusiness">Thao tác</span>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:ImageButton ID="ibtedit" runat="server" ToolTip='Sửa' CssClass="business" CommandName="cmd_edit"
                                    CommandArgument='<%#Eval("Id") %>' ImageUrl="../Design/Icon/icon/edit.png" />
                                <asp:ImageButton ID="ibtdel" runat="server" ToolTip='Xóa' CssClass="business" CommandName="cmd_delete"
                                    CommandArgument='<%#Eval("Id") %>' ImageUrl="../Design/Icon/icon/delete.png" />
                                <asp:ImageButton ID="ibtactive" runat="server" ToolTip='<%#Utilities.TooltipActive(Convert.ToInt32(Eval("active"))) %>'
                                    CommandArgument='<%#Eval("Id") %>' CommandName="cmd_active" CssClass="business" ImageUrl="../Design/Icon/icon/stop1.png" />
                            </ItemTemplate>
                            <HeaderStyle Width="15%"></HeaderStyle>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <SortedAscendingCellStyle BackColor="#EDF6F6" />
                    <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
                    <SortedDescendingCellStyle BackColor="#D6DFDF" />
                    <SortedDescendingHeaderStyle BackColor="#002876" />
                </asp:GridView>
            </div>
            <div class="table">
                <img src="../Design/Icon/icon/add.png" class="control" />
                <asp:LinkButton ID="lbtinsert2" runat="server" OnClick="lbtinsert_Click">Thêm mới</asp:LinkButton>
                <img src="../Design/Icon/icon/delete.png" class="control" />
                <asp:LinkButton ID="lbtdel2" runat="server" OnClick="lbtdel_Click">Xóa</asp:LinkButton>
                <img src="../Design/Icon/icon/refresh.png" class="control" />
                <asp:LinkButton ID="lbtrefress2" runat="server" OnClick="lbtrefresh_Click">Làm tươi</asp:LinkButton>
                <img src="../Design/Icon/icon/uplevel.png" class="control" />
                <a href="javascript:void(0);" onclick="window.history.go(-1);">Trở lại</a>
            </div>
        </div>
    </div>
    <div id="pncontrols" runat="server" visible="False">
        <div class="table">
            <img src="../Design/Icon/icon/page_save.png" class="control" />
            <asp:LinkButton ID="lbtsave1" runat="server" OnClick="lbtsave_Click">Lưu</asp:LinkButton>
            <img src="../Design/Icon/icon/moi.gif" class="control" />
            <asp:LinkButton ID="lbtdonew1" runat="server" OnClick="lbtdonew_Click">Làm mới</asp:LinkButton>
            <img src="../Design/Icon/icon/back.png" class="control" />
            <asp:LinkButton ID="lbtback1" runat="server" OnClick="lbtback_Click">Trở lại</asp:LinkButton>
        </div>
        <div class="frame">
            <div class="rows">
                <div class="ColLeft">
                    <span id="Span1">Hình ảnh:</span>
                </div>
                <div class="ColRight">
                    <input id="fufile" type="file" runat="server" class="fileupload" />
                </div>
            </div>
            <div class="row">
                <div class="ColLeft">
                    <span id="lblNoiDung">Loại:</span>
                </div>
                <div class="ColRight">
                   <select id="ddlType" runat="server" class="combobox">
                       <option value="0">Rage Comic</option>
                       <option value="1">Meme</option>
                   </select>
                </div>
            </div>
           
            <div class="rows">
                <div class="ColLeft">
                    <span id="lblTrangThai">Trạng thái:</span>
                </div>
                <div class="ColRight">
                    <input id="chkactive" type="checkbox" runat="server" class="checkbox" />
                </div>
            </div>

        </div>
        <div class="table">
            <img src="../Design/Icon/icon/page_save.png" class="control" />
            <asp:LinkButton ID="lbtsave2" runat="server" OnClick="lbtsave_Click">Lưu</asp:LinkButton>
            <img src="../Design/Icon/icon/moi.gif" class="control" />
            <asp:LinkButton ID="lbtdonew2" runat="server" OnClick="lbtdonew_Click">Làm mới</asp:LinkButton>
            <img src="../Design/Icon/icon/back.png" class="control" />
            <asp:LinkButton ID="lbtback2" runat="server" OnClick="lbtback_Click">Trở lại</asp:LinkButton>
        </div>
    </div>
    <%--</ContentTemplate>
    </asp:UpdatePanel>--%>
</asp:Content>
